﻿namespace CIK.News.Domain.Mappings
{
    public class ItemMapping : EntityMappingBase<Item>
    {
        public ItemMapping()
        {
            Property(x => x.ItemContentId);

            HasRequired(x => x.Category).WithMany(y => y.Items);

            HasRequired(x => x.ItemContent).WithMany(x=>x.Items).HasForeignKey(key=>key.ItemContentId);

            ToTable("Item");
        }
    }
}